package com.yashi.dao;

import java.util.List;

import com.yashi.entity.TbUserChat;

public interface TbUserChatMapper {
    int deleteByPrimaryKey(String id);

    int insert(TbUserChat record);

    int insertSelective(TbUserChat record);

    TbUserChat selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(TbUserChat record);

    int updateByPrimaryKey(TbUserChat record);
    /**
     * 查询用户消息
     * @param record
     * @return
     */
    List<TbUserChat> selectUserChat(TbUserChat record);
    /**
     * 查询用户最后一条消息
     * @param record
     * @return
     */
    List<TbUserChat> selectLastUserChat(TbUserChat record);
    
    /**
     * 查询未读消息
     * @param record
     * @return
     */
    List<TbUserChat> selectIsReadUserChat(TbUserChat record);
    /**
     * 查询群组消息
     * @param record
     * @return
     */
    List<TbUserChat> selectGroupChat(TbUserChat record);
    /**
     * 查询最后一条群组消息
     * @param record
     * @return
     */
    List<TbUserChat> selectLastGroupChat(TbUserChat record);
    /**
     * 查询群文件
     * @param receiveId
     * @return
     */
    List<TbUserChat> selectFiles(String receiveId);
    /**
     * 查询用户文件
     * @param record
     * @return
     */
    List<TbUserChat> selectUserFiles(TbUserChat record);
}